package com.module.app.bean;

import androidx.annotation.Keep;

import java.io.Serializable;
import java.util.Random;

/**广告配置*/
@Keep
public class AdConfig implements Serializable {
    private @IType.IAdType
    int adType = -1;//开屏广告类型
    private @IType.IAdType
    int adCPType = -1;//插屏广告类型
    private @IType.IAdType
    int adDrawType = -1;//信息流广告类型
    private @IType.IAdType
    int adVideoType = IType.IAdType.NULL;//激励广告类型-广告活动
    private int maxRandom = 2;//开屏最大随机数
    private int maxRandomCP = 2;//插屏最大随机数
    private int maxRandomDraw = 2;//信息流最大随机数
    private String TTId = "5166727";//头条ID
    private String TTSplashId;//头条开屏广告
    private String TTCpId;//头条插屏广告
    private String TTDrawId;//头条信息流广告
    private String TTVideoId;//头条激励广告
    private String TxId = "1101152570";//腾讯ID
    private String TXSplashId;//腾讯开屏广告
    private String TXCpId;//腾讯插屏广告
    private String TXDrawId;//腾讯信息流广告
    private String TXVideoId;//腾讯激励广告

    public @IType.IAdType
    int getAdType() {
        if (adType == IType.IAdType.NULL) {
            Random random = new Random();
            return random.nextInt(getMaxRandom() + 1);
        } else {
            return adType;
        }
    }

    public @IType.IAdType
    int getAdCPType() {
        if (adCPType == IType.IAdType.NULL) {
            Random random = new Random();
            return random.nextInt(getMaxRandomCP() + 1);
        } else {
            return adCPType;
        }
    }

    public @IType.IAdType
    int getAdDrawType() {
        if (adDrawType == IType.IAdType.NULL) {
            Random random = new Random();
            return random.nextInt(getMaxRandomDraw() + 1);
        } else {
            return adDrawType;
        }
    }

    public @IType.IAdType int getAdVideoType() {
        if (adVideoType == IType.IAdType.NULL) {
            Random random = new Random();
            return random.nextInt(2) + 1;
        } else {
            return adVideoType;
        }
    }

    public int getMaxRandom() {
        return maxRandom;
    }

    public int getMaxRandomCP() {
        return maxRandomCP;
    }

    public int getMaxRandomDraw() {
        return maxRandomDraw;
    }

    public String getTTSplashId() {
        return TTSplashId;
    }

    public void setTTSplashId(String TTSplashId) {
        this.TTSplashId = TTSplashId;
    }

    public String getTTCpId() {
        return TTCpId;
    }

    public void setTTCpId(String TTCpId) {
        this.TTCpId = TTCpId;
    }

    public String getTTDrawId() {
        return TTDrawId;
    }

    public void setTTDrawId(String TTDrawId) {
        this.TTDrawId = TTDrawId;
    }

    public String getTTVideoId() {
        return TTVideoId;
    }

    public void setTTVideoId(String TTVideoId) {
        this.TTVideoId = TTVideoId;
    }

    public String getTXSplashId() {
        return TXSplashId;
    }

    public void setTXSplashId(String TXSplashId) {
        this.TXSplashId = TXSplashId;
    }

    public String getTXCpId() {
        return TXCpId;
    }

    public void setTXCpId(String TXCpId) {
        this.TXCpId = TXCpId;
    }

    public String getTXDrawId() {
        return TXDrawId;
    }

    public void setTXDrawId(String TXDrawId) {
        this.TXDrawId = TXDrawId;
    }

    public String getTXVideoId() {
        return TXVideoId;
    }

    public void setTXVideoId(String TXVideoId) {
        this.TXVideoId = TXVideoId;
    }

    public String getTTId() {
        return TTId;
    }

    public void setTTId(String TTId) {
        this.TTId = TTId;
    }

    public String getTxId() {
        return TxId;
    }

    public void setTxId(String txId) {
        TxId = txId;
    }
}
